package com.zpark.controller;

import com.zpark.entity.patients.MedicalRecords;
import com.zpark.service.MedicalRecordsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/api/medical-records")
public class MedicalRecordsController {

    @Autowired
    private MedicalRecordsService medicalRecordsService;

    /**
     * 获取所有病历记录
     * @return 病历记录列表
     */
    @GetMapping("/all")
    public List<MedicalRecords> getAllMedicalRecords() {
        return medicalRecordsService.getAllMedicalRecords();
    }
}